package com.cloud.quickcore.admin.dto;

import com.cloud.quickcommon.biz.BaseBizConvert;
import com.cloud.quickcore.admin.entity.SysRole;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * DML角色表--Dto
 * @author NiJo_H
 * @version 1.0
 * @date 2019/8/11 14:20
 */
@Data
public class SysRoleDto implements BaseBizConvert<SysRole> {
    /**角色id*/
    @ApiModelProperty(value = "角色id")
    private Long id;

    @ApiModelProperty(value = "角色字符串",required = true)
    private String roleCode;
    /**角色名称*/
    @ApiModelProperty(value = "角色名称",required = true)
    private String roleName;

    @Override
    public SysRole convertEntity() {
        SysRole sysRole=new SysRole();
        sysRole.setId(id);
        sysRole.setName(roleName);
        sysRole.setRoleCode(roleCode);
        return sysRole;
    }
}
